{# Copyright (c) 2006-2007, PreFab Software Inc. #}
{# modificat per apsl #}

{% load blog_extras %}
{% load prefab_tags %}
{% load comment_utils %}
{% load markup i18n %}

<!-- articles -->
<div>
    <h1 class="alt article"><a href='{{ object.get_absolute_url }}' title='{{ object.headline }}' rel='bookmark'>{{ object.headline }}</a></h1>
    <hr/>
    <h5 class="info_article">
		{% trans "Escrit per " %}<a href='{% BLOG_ROOT %}user/{{ object.user }}/'>{{ object.user|title }}</a>{% trans " a " %}<a href='{% BLOG_ROOT %}{{ object.pub_date|date:"Y/m/d" }}/'>{{ object.pub_date|date:"d" }}</a> de <a href='{% BLOG_ROOT %}{{ object.pub_date|date:"Y/m" }}/'>{{ object.pub_date|date:"F" }}</a> , <a href='{% BLOG_ROOT %}{{ object.pub_date|date:"Y" }}/'>{{ object.pub_date|date:"Y" }}</a> a les {{ object.pub_date|time }}    {% if user.is_authenticated %}&nbsp; <a href="/admin/blog/entry/{{object.id}}/">{% trans "Editar" %}</a>&nbsp;<a href="/blogmaker/{{object.id}}/postTrackbacks/">Post trackbacks</a>{% endif %}
    </h5>
    <hr/>
    {% if object.image %}
        <a href='{{ object.get_absolute_url }}' class='image'>
            <img src='{{ object.image.url }}'
                 class="blog_image" alt="Link to {{ object.headline }}" title="{{object.copyright}}"/></a>
    {% endif %}
    <div class="article_body">{{ object.body|safe }}</div>
    <hr/>
    {% if forloop.counter %}
    {% else %}
    {% with object.links as entry_links %}
    {%if entry_links %}
            <h6>{% trans "Enlla&ccedil;os citats" %}</h6>
            <ul>
                {% for link in entry_links %}
                <li>{{foorloop.counter}} <a href="{{link.url}}" target="_blank" title="{{link.title}}">{{link.anchor}}</a></li>
            {% endfor %}
                </ul>
        {% endif %}
    {% endwith %}
    {% endif %}
    {% block translations %}
    <h6>Traducciones/Translations by <a href="http://www.apertium.org">apertium</a></h6>
    <ul id="translation">
        <li>
            <a href="http://www.apertium.org/common/browser.php?dir=ca-es&inurl={{ object.get_absolute_url }}" rel="noindex,nofollow" title="traducir al castellano">CA::>ES</a>
        </li>
        <li>
           <a href="http://www.apertium.org/common/browser.php?dir=ca-en&inurl={{ object.get_absolute_url }}" rel="noindex,nofollow" title ="translate into english">CA::>EN</a>
        </li>
        <li>
          <a href="http://www.apertium.org/common/browser.php?dir=ca-fr&inurl={{ object.get_absolute_url }}" rel="noindex,nofollow" title="ca to fr" >CA::>FR</a>
        </li>
    </ul>
    <br/>
    {% endblock translations %}
    <p class="box">
    {% get_public_comment_count for blog.entry object.id as comment_count %}
    {% get_public_trackback_count for blog.entry object.id as trackback_count %}
    <a href='{{ object.get_absolute_url }}#comments' >{{ comment_count }} {% trans "comentari"%}{{ comment_count|pluralize }}</a>,
    <a href='{{ object.get_absolute_url }}#trackbacks'>{{ trackback_count }} trackback{{ trackback_count|pluralize }}</a> (<a href="{{ object.get_absolute_url }}trackback/" rel="trackback">URL</a>)
    {% for t in object.get_tags %}{% if forloop.first %},&nbsp;<a href='{% BLOG_ROOT %}tag/' class='blog_sm'>{% trans "Tags:" %}</a>{% endif %} 
    <a href="{{ t.get_absolute_url }}" title="{% trans 'Entrades classificades com'%} '{{ t }}'">{{ t }}
    </a>
    {% endfor %} 
    </p>
    
    {% if forloop.counter %}
    {% else %}
    <div class="loud">
    {% for object in object.get_related_entries %}
    {% if forloop.first %}
    <span>{% trans "Relacionats:" %}</span>
    <br />
    {% endif %}
    <span>&nbsp;&nbsp;&nbsp;{{ forloop.counter }}. </span><a href='{{ object.get_absolute_url }}'>
    {{ object.headline }}
    </a>   
    {% endfor %}    
    </div>
    {% endif %}
    <br /> 
</div>
<!-- fi de la secció d'articles -->
